class AddAdminFieldToUsers < ActiveRecord::Migration
  def self.up
    add_column :users, :admin, :integer
    if User.count > 0
      user = User.find :first
      user.admin = true
      user.save_with_validation(false)
    end
  end

  def self.down
    remove_column :users, :admin
  end
end
